import tkinter as tk
from tkinter.messagebox import showinfo
import datetime
root = tk.Tk()
# def clicked():
#     day = datetime.datetime.now().strftime('%d %b %Y')
#     time = datetime.datetime.now().strftime('%H:%M:%S %p')
#     text = 'Day：'+day+'\n'+'Time：'+time+'\n'
#     showinfo(message=text)
#
# b = tk.Button(root,text='click',command = clicked)
# b.pack()
#
# root.mainloop()
root.title("hello world")
root.geometry()


def printhello():
    t.insert('1.0', "hello\n")

t = tk.Text()
t.pack()
tk.Button(root, text="press", command=printhello).pack()
root.mainloop()